package com.maywide.jdp.system.vo;

import java.io.Serializable;

import com.google.gson.annotations.Expose;

/**
 * 按钮树对象类
 * 
 * @author luoyang
 * @version 1.0
 * @since JDK1.6
 * 
 */
public class BusinessFunctionTree implements Serializable {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = -4907228086453789508L;

	/**
	 * ID
	 */
	@Expose
	private String id = null;
	
	/**
	 * 编码
	 */
	@Expose
	private String code = null;
	
	/**
	 * 名称
	 */
	@Expose
	private String name = null;
	
	/**
	 * 类名
	 */
	@Expose
	private String serverClass = null;

	/**
	 * 函数名
	 */
	@Expose
	private String serverFunction = null;

	/**
	 * 描述
	 */
	@Expose
	private String description = null;
	
	/**
	 * 可用
	 */
	@Expose
	private boolean active = true;
	
	/**
	 * 显示文本
	 */
	@Expose
	private String text = null;

	/**
	 * 所在模块ID
	 */
	@Expose
	private String moduleID = null;
	
	/**
	 * 
	 */
	@Expose
	private boolean checked = false;
	
	/**
	 * 
	 */
	@Expose
	private boolean leaf = true;

	/**
	 * @return the id
	 */
	public String getId() {
		return id;
	}

	/**
	 * @param id the id to set
	 */
	public void setId(String id) {
		this.id = id;
	}

	/**
	 * @return the code
	 */
	public String getCode() {
		return code;
	}

	/**
	 * @param code the code to set
	 */
	public void setCode(String code) {
		this.code = code;
	}

	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}

	/**
	 * @param name the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * @return the description
	 */
	public String getDescription() {
		return description;
	}

	/**
	 * @param description the description to set
	 */
	public void setDescription(String description) {
		this.description = description;
	}

	/**
	 * @return the active
	 */
	public boolean isActive() {
		return active;
	}

	/**
	 * @param active the active to set
	 */
	public void setActive(boolean active) {
		this.active = active;
	}

	/**
	 * @param text the text to set
	 */
	public void setText(String text) {
		this.text = text;
	}

	/**
	 * @return the text
	 */
	public String getText() {
		return text;
	}

	/**
	 * @param moduleID the moduleID to set
	 */
	public void setModuleID(String moduleID) {
		this.moduleID = moduleID;
	}

	/**
	 * @return the moduleID
	 */
	public String getModuleID() {
		return moduleID;
	}

	/**
	 * @param checked the checked to set
	 */
	public void setChecked(boolean checked) {
		this.checked = checked;
	}

	/**
	 * @return the checked
	 */
	public boolean isChecked() {
		return checked;
	}

	/**
	 * @param leaf the leaf to set
	 */
	public void setLeaf(boolean leaf) {
		this.leaf = leaf;
	}

	/**
	 * @return the leaf
	 */
	public boolean isLeaf() {
		return leaf;
	}

	public String getServerClass() {
		return serverClass;
	}

	public void setServerClass(String serverClass) {
		this.serverClass = serverClass;
	}

	public String getServerFunction() {
		return serverFunction;
	}

	public void setServerFunction(String serverFunction) {
		this.serverFunction = serverFunction;
	}

	@Override
	public boolean equals(Object obj) {
		if(obj instanceof BusinessFunctionTree) {
			if(((BusinessFunctionTree)obj).getId().equals(id))
				return true;
		}
		return false;
	}
}
